<?php
/*
Author: Hallvard Westman
Project: Links
 --------------------------------COMMON FUNCTIONS----------------------------------------*/
 

 
 function countc($viewc){
 include 'db.php';
 $UserId=$_GET['id'];
 $viewc++;
 
 $sql2 = 'UPDATE li_links SET Count =:viewc WHERE UserId = :UserId';
 $sth2 = $db->prepare($sql2);
 $sth2->bindParam(':UserId',$UserId);
 $sth2->bindParam(':viewc',$viewc);
 $sth2->execute();  
  }